from pydantic_settings import BaseSettings
from typing import List

class Settings(BaseSettings):
    # 应用配置
    APP_NAME: str = "土壤多源数据智能监测平台"
    DEBUG: bool = True
    HOST: str = "0.0.0.0"
    PORT: int = 8000
    
    # 跨域配置
    ALLOWED_HOSTS: List[str] = ["http://localhost:5173", "http://127.0.0.1:5173"]
    
    # 数据库配置
    HIVE_HOST: str = "localhost"
    HIVE_PORT: int = 10000
    HIVE_DATABASE: str = "soil_monitoring"
    
    # HDFS配置
    HDFS_HOST: str = "localhost"
    HDFS_PORT: int = 9000
    
    # 邮件配置
    SMTP_SERVER: str = "smtp.gmail.com"
    SMTP_PORT: int = 587
    SMTP_USERNAME: str = ""
    SMTP_PASSWORD: str = ""
    
    class Config:
        env_file = ".env"

settings = Settings()
